Optimal. Leaf size=71 \[ \frac {a^2 A x^{1+m}}{1+m}+\frac {a (2 A b+a B) x^{3+m}}{3+m}+\frac {b (A b+2 a B) x^{5+m}}{5+m}+\frac {b^2 B x^{7+m}}{7+m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {459}
\begin {gather*} \frac {a^2 A x^{m+1}}{m+1}+\frac {a x^{m+3} (a B+2 A b)}{m+3}+\frac {b x^{m+5} (2 a B+A b)}{m+5}+\frac {b^2 B x^{m+7}}{m+7} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 459
Rubi steps
\begin {align*} \int x^m \left (a+b x^2\right )^2 \left (A+B x^2\right ) \, dx &=\int \left (a^2 A x^m+a (2 A b+a B) x^{2+m}+b (A b+2 a B) x^{4+m}+b^2 B x^{6+m}\right ) \, dx\\ &=\frac {a^2 A x^{1+m}}{1+m}+\frac {a (2 A b+a B) x^{3+m}}{3+m}+\frac {b (A b+2 a B) x^{5+m}}{5+m}+\frac {b^2 B x^{7+m}}{7+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 66, normalized size = 0.93 \begin {gather*} x^{1+m} \left (\frac {a^2 A}{1+m}+\frac {a (2 A b+a B) x^2}{3+m}+\frac {b (A b+2 a B) x^4}{5+m}+\frac {b^2 B x^6}{7+m}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 82, normalized size = 1.15
method | result | size |
norman | \(\frac {a \left (2 A b +B a \right ) x^{3} {\mathrm e}^{m \ln \left (x \right )}}{3+m}+\frac {a^{2} A x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {b \left (A b +2 B a \right ) x^{5} {\mathrm e}^{m \ln \left (x \right )}}{5+m}+\frac {b^{2} B \,x^{7} {\mathrm e}^{m \ln \left (x \right )}}{7+m}\) | \(82\) |
risch | \(\frac {x \left (B \,b^{2} m^{3} x^{6}+9 B \,b^{2} m^{2} x^{6}+A \,b^{2} m^{3} x^{4}+2 B a b \,m^{3} x^{4}+23 m \,x^{6} b^{2} B +11 A \,b^{2} m^{2} x^{4}+22 B a b \,m^{2} x^{4}+15 b^{2} B \,x^{6}+2 A a b \,m^{3} x^{2}+31 A \,b^{2} x^{4} m +B \,a^{2} m^{3} x^{2}+62 B a b \,x^{4} m +26 A a b \,m^{2} x^{2}+21 A \,b^{2} x^{4}+13 B \,a^{2} m^{2} x^{2}+42 B a b \,x^{4}+A \,a^{2} m^{3}+94 a A b \,x^{2} m +47 B \,a^{2} x^{2} m +15 A \,a^{2} m^{2}+70 a A b \,x^{2}+35 B \,a^{2} x^{2}+71 a^{2} A m +105 a^{2} A \right ) x^{m}}{\left (7+m \right ) \left (5+m \right ) \left (3+m \right ) \left (1+m \right )}\) | \(261\) |
gosper | \(\frac {x^{1+m} \left (B \,b^{2} m^{3} x^{6}+9 B \,b^{2} m^{2} x^{6}+A \,b^{2} m^{3} x^{4}+2 B a b \,m^{3} x^{4}+23 m \,x^{6} b^{2} B +11 A \,b^{2} m^{2} x^{4}+22 B a b \,m^{2} x^{4}+15 b^{2} B \,x^{6}+2 A a b \,m^{3} x^{2}+31 A \,b^{2} x^{4} m +B \,a^{2} m^{3} x^{2}+62 B a b \,x^{4} m +26 A a b \,m^{2} x^{2}+21 A \,b^{2} x^{4}+13 B \,a^{2} m^{2} x^{2}+42 B a b \,x^{4}+A \,a^{2} m^{3}+94 a A b \,x^{2} m +47 B \,a^{2} x^{2} m +15 A \,a^{2} m^{2}+70 a A b \,x^{2}+35 B \,a^{2} x^{2}+71 a^{2} A m +105 a^{2} A \right )}{\left (7+m \right ) \left (5+m \right ) \left (3+m \right ) \left (1+m \right )}\) | \(262\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 91, normalized size = 1.28 \begin {gather*} \frac {B b^{2} x^{m + 7}}{m + 7} + \frac {2 \, B a b x^{m + 5}}{m + 5} + \frac {A b^{2} x^{m + 5}}{m + 5} + \frac {B a^{2} x^{m + 3}}{m + 3} + \frac {2 \, A a b x^{m + 3}}{m + 3} + \frac {A a^{2} x^{m + 1}}{m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 215 vs.
\(2 (71) = 142\).
time = 1.18, size = 215, normalized size = 3.03 \begin {gather*} \frac {{\left ({\left (B b^{2} m^{3} + 9 \, B b^{2} m^{2} + 23 \, B b^{2} m + 15 \, B b^{2}\right )} x^{7} + {\left ({\left (2 \, B a b + A b^{2}\right )} m^{3} + 42 \, B a b + 21 \, A b^{2} + 11 \, {\left (2 \, B a b + A b^{2}\right )} m^{2} + 31 \, {\left (2 \, B a b + A b^{2}\right )} m\right )} x^{5} + {\left ({\left (B a^{2} + 2 \, A a b\right )} m^{3} + 35 \, B a^{2} + 70 \, A a b + 13 \, {\left (B a^{2} + 2 \, A a b\right )} m^{2} + 47 \, {\left (B a^{2} + 2 \, A a b\right )} m\right )} x^{3} + {\left (A a^{2} m^{3} + 15 \, A a^{2} m^{2} + 71 \, A a^{2} m + 105 \, A a^{2}\right )} x\right )} x^{m}}{m^{4} + 16 \, m^{3} + 86 \, m^{2} + 176 \, m + 105} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1044 vs.
\(2 (63) = 126\).
time = 0.40, size = 1044, normalized size = 14.70 \begin {gather*} \begin {cases} - \frac {A a^{2}}{6 x^{6}} - \frac {A a b}{2 x^{4}} - \frac {A b^{2}}{2 x^{2}} - \frac {B a^{2}}{4 x^{4}} - \frac {B a b}{x^{2}} + B b^{2} \log {\left (x \right )} & \text {for}\: m = -7 \\- \frac {A a^{2}}{4 x^{4}} - \frac {A a b}{x^{2}} + A b^{2} \log {\left (x \right )} - \frac {B a^{2}}{2 x^{2}} + 2 B a b \log {\left (x \right )} + \frac {B b^{2} x^{2}}{2} & \text {for}\: m = -5 \\- \frac {A a^{2}}{2 x^{2}} + 2 A a b \log {\left (x \right )} + \frac {A b^{2} x^{2}}{2} + B a^{2} \log {\left (x \right )} + B a b x^{2} + \frac {B b^{2} x^{4}}{4} & \text {for}\: m = -3 \\A a^{2} \log {\left (x \right )} + A a b x^{2} + \frac {A b^{2} x^{4}}{4} + \frac {B a^{2} x^{2}}{2} + \frac {B a b x^{4}}{2} + \frac {B b^{2} x^{6}}{6} & \text {for}\: m = -1 \\\frac {A a^{2} m^{3} x x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {15 A a^{2} m^{2} x x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {71 A a^{2} m x x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {105 A a^{2} x x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {2 A a b m^{3} x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {26 A a b m^{2} x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {94 A a b m x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {70 A a b x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {A b^{2} m^{3} x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {11 A b^{2} m^{2} x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {31 A b^{2} m x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {21 A b^{2} x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {B a^{2} m^{3} x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {13 B a^{2} m^{2} x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {47 B a^{2} m x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {35 B a^{2} x^{3} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {2 B a b m^{3} x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {22 B a b m^{2} x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {62 B a b m x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {42 B a b x^{5} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {B b^{2} m^{3} x^{7} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {9 B b^{2} m^{2} x^{7} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {23 B b^{2} m x^{7} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} + \frac {15 B b^{2} x^{7} x^{m}}{m^{4} + 16 m^{3} + 86 m^{2} + 176 m + 105} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs.
\(2 (71) = 142\).
time = 0.68, size = 332, normalized size = 4.68 \begin {gather*} \frac {B b^{2} m^{3} x^{7} x^{m} + 9 \, B b^{2} m^{2} x^{7} x^{m} + 2 \, B a b m^{3} x^{5} x^{m} + A b^{2} m^{3} x^{5} x^{m} + 23 \, B b^{2} m x^{7} x^{m} + 22 \, B a b m^{2} x^{5} x^{m} + 11 \, A b^{2} m^{2} x^{5} x^{m} + 15 \, B b^{2} x^{7} x^{m} + B a^{2} m^{3} x^{3} x^{m} + 2 \, A a b m^{3} x^{3} x^{m} + 62 \, B a b m x^{5} x^{m} + 31 \, A b^{2} m x^{5} x^{m} + 13 \, B a^{2} m^{2} x^{3} x^{m} + 26 \, A a b m^{2} x^{3} x^{m} + 42 \, B a b x^{5} x^{m} + 21 \, A b^{2} x^{5} x^{m} + A a^{2} m^{3} x x^{m} + 47 \, B a^{2} m x^{3} x^{m} + 94 \, A a b m x^{3} x^{m} + 15 \, A a^{2} m^{2} x x^{m} + 35 \, B a^{2} x^{3} x^{m} + 70 \, A a b x^{3} x^{m} + 71 \, A a^{2} m x x^{m} + 105 \, A a^{2} x x^{m}}{m^{4} + 16 \, m^{3} + 86 \, m^{2} + 176 \, m + 105} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.18, size = 177, normalized size = 2.49 \begin {gather*} x^m\,\left (\frac {B\,b^2\,x^7\,\left (m^3+9\,m^2+23\,m+15\right )}{m^4+16\,m^3+86\,m^2+176\,m+105}+\frac {A\,a^2\,x\,\left (m^3+15\,m^2+71\,m+105\right )}{m^4+16\,m^3+86\,m^2+176\,m+105}+\frac {a\,x^3\,\left (2\,A\,b+B\,a\right )\,\left (m^3+13\,m^2+47\,m+35\right )}{m^4+16\,m^3+86\,m^2+176\,m+105}+\frac {b\,x^5\,\left (A\,b+2\,B\,a\right )\,\left (m^3+11\,m^2+31\,m+21\right )}{m^4+16\,m^3+86\,m^2+176\,m+105}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________